package com.chandra.pos.employee.dao;

import com.chandra.pos.SearchCriteria;
import com.chandra.pos.employee.dao.entity.Employee;
import com.chandra.pos.employee.dao.entity.EmployeeRole;
import com.chandra.pos.employee.exception.SystemUserNotFoundException;
import com.chandra.pos.employee.model.EmployeeSearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 
 * Customer DAO Interface
 * 
 * @author onlinetechvision.com
 * @since 25 Mar 2012
 * @version 1.0.0
 *
 */

public interface ISystemUserDAO {

	/**
	 * Add Customer
	 * 
	 * @param  User customer
	 */
	public Employee addSystemUser(Employee customer);
	
	/**
	 * Update Customer
	 * 
	 * @param  User customer
	 */
	public Employee updateUser(Employee customer);
	
	/**
	 * Delete Customer
	 * 
	 * @param  User customer
	 */
	public void deleteUser(Employee customer);
	
	/**
	 * Get Customer
	 * 
	 * @param  int Customer Id
	 */
	public Employee getUserById(Long id);
	
	/**
	 * Get Customer List
	 * 
	 */
	public Page getUsers(PageRequest posPagination);

    public Employee getUserDetail(String firstName, String lastName, String city) throws SystemUserNotFoundException;

    public Employee getUserDetail(Long id) throws SystemUserNotFoundException;

    public Employee getUserDetail(String userName) throws  SystemUserNotFoundException;

    public List<Employee> searchUsers(EmployeeSearchCriteria searchCriteria);
    public List<Employee> searchUsers(SearchCriteria searchCriteria);

    public List<EmployeeRole> getUserRoles(Long id);
}
